{% extends "base.html" %}
{% load thumbnails %}

{% block title %}{{ object.title }}{% endblock %}

{% block content %}
<h3 style="font-weight: normal;text-align: center;">{{ object.title }}</h3>

<p align="center">
<!--<a href="/static/{{ object.image_file }}">-->
{% with object.image_file|thumbnail:"640x480" as image_thumb %}
{% if image_thumb %}
<img alt="{{ object.title }}" src="{{ image_thumb.url }}" width="{{ image_thumb.thumbnail.size.0 }}" height="{{ image_thumb.thumbnail.size.1 }}" />
{% else %}
<img alt="{{ object.title }}" src="http://media.bryanlewissaunders.org/{{ object.image_file }}" width="{{ object.get_image_file_width }}" height="{{ object.get_image_file_height }}" />
{% endif %}
{% endwith %}
<!--</a>-->
</p>

<p align="center">
{% include "artwerx/info.html" %}
{% if object.is_for_sale and not object.has_been_sold %}
	{% if object.price %}${{ object.price }}<br />
	{% else %}For Sale<br />{% endif %}
{% endif %}
{% ifnotequal object.is_for_sale NULL %}
        {% if not object.is_for_sale %}Not For Sale<br />{% endif %}
{% endifnotequal %}
{% if object.has_been_sold %}Sold{% endif %}
</p>

{% if object.commentary %}
	<h3>Artist's Comments:</h3>
	<p>
	<pre>{{ object.commentary|striptags }}</pre>
	</p>
{% endif %}

<p align="center">
{% comment %}
{% for tag in tag_list %}
<a href="{% url tag_gallery tag %}">Back to {{ tag }}</a><br />
{% endfor %}
{% endcomment %}
<a href="{% if object.year %}/gallery/{{ object.year }}/">Back to {{ object.year }}
{% else %}{% url index %}">Back to Index{% endif %}</a>
</p>
{% endblock %}
